package JavaSE;

class Parent{
    Parent(){
        System.out.println("父类无参构造方法");
    }
    Parent(int a){
        System.out.println("父类带参构造方法参数为int型数据:"+a);
    }

    Parent(String s){
        System.out.println("父类带参构造方法参数为String型数据:"+s);
    }
}

class Child extends Parent {
    Child(){
        super();
        System.out.println("子类无参构造方法");
    }
    Child(int a){
        super(a);
        System.out.println("子类带int型参数的构造方法");
    }

    Child(String s){
        super(s);
        System.out.println("子类带String型参数的构造方法");
    }
}

public class extends_test{
    public static void main(String args[]){
//        Child child = new Child("哈哈");
//        String s = "哈哈";
//        child.Child(s);
        Child child = new Child();
//        String s = "哈哈";
//        child.Child(s);
    }
}